/***********************************************************************
 favorite.h
***********************************************************************/
#ifndef FAVORITE_H
#define FAVORITE_H

#include <mysql++.h>
#include <ssqls.h>

// The following is calling a very complex macro which will create
// "struct favorite", which has the member variables:
//
//   sql_char name;
//   ...
//   Null<sql_mediumtext> description;
//
// plus methods to help populate the class from a MySQL row.  

sql_create_5( // 5 fields in table favorite.
    favorite, // Name
	2,  // The number of fields used to Compare two records.
    1, // Add constuctor into struct favorite with 1 parameter(name)
	mysqlpp::sql_char, name, // Field Type + Field Name 
    mysqlpp::sql_char, market,
	mysqlpp::sql_bigint, code,
	mysqlpp::sql_double, price,
	mysqlpp::Null<mysqlpp::sql_mediumtext>, description)

#endif //FAVORITE_H
